//
//  ButtonCell.m
//  Zyachting
//
//  Created by hungnt47 on 16/10/2012.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "DamageReportButtonsCell.h"

@implementation DamageReportButtonCell
@synthesize  addPhotoButton;
@synthesize  saveButton;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)drawRect:(CGRect)rect{
    [super drawRect:rect];
    [self.contentView setBackgroundColor:[UIColor clearColor]];
    [self setBackgroundView:nil];
    [self setBackgroundColor:[UIColor clearColor]];

    UIImage* buttonImage =[[UIImage imageNamed:@"greenButton"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0];
    UIImage* buttonImageON =[[UIImage imageNamed:@"greenButtonOn"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0];
    
    [addPhotoButton setBackgroundImage:buttonImage forState:UIControlStateNormal];
    [addPhotoButton setBackgroundImage:buttonImageON forState:UIControlStateHighlighted];
    [addPhotoButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [addPhotoButton setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];
    
    [saveButton setBackgroundImage:buttonImage forState:UIControlStateNormal];
    [saveButton setBackgroundImage:buttonImageON forState:UIControlStateHighlighted];
    [saveButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [saveButton setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];

}
@end
